Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add repo_data option to host registration command #1210

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dosas
Copy link
Collaborator

@dosas dosas commented Aug 14, 2024

Description of changes

Add repo_data option to host registration command

Upstream API documentation, plugin, or feature links

The foreman upstream api is not up to date so I can only link the PR
theforeman/foreman#10162

Functional demonstration

I am executing it via robottelo I do not know how to extract the raw api call.

Additional Information

None

@dosas dosas added the No-CherryPick PR doesnt need CherryPick to previous branches label Aug 14, 2024
@omkarkhatavkar
Copy link

Can one of the admins verify this patch?

@ogajduse
Copy link
Member

@dosas When would you like to get this PR merged? Before the upstream PR is merged or after?

IIRC, we nailgun can not define fields that are not implemented in API unless an ignore exists for that field.

@dosas
Copy link
Collaborator Author

dosas commented Aug 19, 2024

@dosas When would you like to get this PR merged? Before the upstream PR is merged or after?

IIRC, we nailgun can not define fields that are not implemented in API unless an ignore exists for that field.

The above mentioned PR is already merged since a few months. The field should be part of the latest foreman?

@ogajduse ogajduse requested a review from a team August 22, 2024 11:58
@@ -6795,6 +6795,7 @@ def __init__(self, server_config=None, **kwargs):
'update_packages': entity_fields.BooleanField(default=False),
'force': entity_fields.BooleanField(default=False),
'ignore_subman_errors': entity_fields.BooleanField(default=False),
'repo_data': entity_fields.ListField(),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dosas Thanks for adding this. Yes, I saw this option being added in foreman recently, and as per apidoc I see it is a Array with repository URL and corresponding GPG key URL, so I think ListField might not work here, so could you try DictField instead if it doesn't?

Also, I was wondering if you had any robottelo tests covering the repo_data? To verify this, we could run the PRT with that?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO it is a list of dicts, so ListField should be correct. I have robottelo tests using this feature but they are not upstream.

The tests that are using api_register in robottelo do not use repo_data currently.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Gauravtalreja1 Gauravtalreja1 added CherryPick PR needs CherryPick to previous branches 6.16.z and removed No-CherryPick PR doesnt need CherryPick to previous branches labels Aug 27, 2024
@ogajduse ogajduse requested a review from a team October 3, 2024 19:53
@dosas dosas force-pushed the repo-data-host-registration branch from c7965a4 to 02289d0 Compare November 13, 2024 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.16.z CherryPick PR needs CherryPick to previous branches
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants